package com.microservices.cloud.controller;

import com.microservices.cloud.entities.CommonResult;
import com.microservices.cloud.entity.Order;
import com.microservices.cloud.service.OrderService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class OrderController {


    @Resource
    private OrderService orderService;

    @GetMapping("/order/createOrder")
    public CommonResult createOrder(Order order) {
        orderService.insertOrder(order);
        return new CommonResult(200, "订单创建成功！");
    }


}
